#ifndef COMMON_IVECTOR_H
#define COMMON_IVECTOR_H

#include <vector>
#include "Common/Collections/IIterator.h"
#include "Common/Collections/IIterable.h"
#include "Common/Collections/ICollection.h"

namespace cmn {

	template<typename T>
	class IVector : public ICollection<T> {
	public:
		virtual ~IVector() {}

		virtual T& operator[]( int index ) = 0;
		virtual const T& operator[]( int index ) const = 0;

		virtual T GetAt( int index ) const = 0;
		virtual void SetAt( int index, T value ) = 0;

		virtual int GetLength() const = 0;

		virtual void Add( T item ) = 0;
		virtual void AddRange( IIterable<T>* iterable ) = 0;
		virtual void Insert( int index, T item ) = 0;

		virtual void Remove( T item ) = 0;
		virtual void Remove( bool ( *predicate )( const T& item ) ) = 0;
		virtual void RemoveAt( int index ) = 0;

		virtual void Clear() = 0;

		virtual bool Contains( T item ) const = 0;

		virtual int IndexOf( T item ) const = 0;
		virtual int IndexOf( bool ( *predicate )( const T& item ) ) const = 0;

		virtual T Find( bool ( *predicate )( const T& item ) ) const = 0;

		virtual void Sort( bool ( *predicate )( const T& itemA, const T& itemB ) ) = 0;
		virtual void SortStable( bool ( *predicate )( const T& itemA, const T& itemB ) ) = 0;
	};
}
#endif
